//
//  XCcollectionOfgedan.m
//  TTLestening
//
//  Created by dllo on 16/3/22.
//  Copyright © 2016年 dilo. All rights reserved.
//

#import "XCcollectionOfgedan.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "XCModelForFind.h"

@interface XCcollectionOfgedan ()

@property (weak, nonatomic) IBOutlet UIImageView *backImage;
@property (weak, nonatomic) IBOutlet UILabel *labelForImage;
@property (weak, nonatomic) IBOutlet UILabel *labelForMedia;
@property (weak, nonatomic) IBOutlet UILabel *labelForNumber;
@property (weak, nonatomic) IBOutlet UIImageView *ImageListen;


@end

@implementation XCcollectionOfgedan

- (void)awakeFromNib {
    // Initialization code
    
  
    
}

- (void)passModel:(XCModelForFind *)model {

    [self.backImage sd_setImageWithURL:[NSURL URLWithString:model.picUrl]];
    self.labelForImage.text = model.name;
    
    self.labelForMedia.text = model.desc;

    if (model.listenCount > 10000) {
        
        self.labelForNumber.text = [NSString stringWithFormat:@"%.0f万", round(model.listenCount / 10000) ];
    } else {
    
        self.labelForNumber.hidden = YES;
        self.ImageListen.hidden = YES;
    }

    
}



@end
